Add remote enable/disable of gift card providers via info server#6032
Conversation
ed30d64 to
364b5c0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 364b5c0. Configure here.
364b5c0 to
dbc2747
Compare
📸 Test evidence — info-server category gating (sim, maestro)agent proof 1215731967028387 01 giftcard categories baseline agent proof 1215731967028387 02 giftcard categories apparel disabled agent proof 1215731967028387 03 giftcard marketplace flow pass Captured by the agent's in-app test run (build-and-test). |
peachbits
left a comment
There was a problem hiding this comment.
There's a lot of duplicated functionality here that seems unnecessary. We could just add 'spend' as a key to the exchangeInfo object and avoid the new redux value and info server document entirely.
|
Also, the term spendInfo is a poor choice since that term is already broadly used across the app |
94442cc to
a938e1e
Compare
Consume a new spendInfo config from the info server, mirroring the exchangeInfo pattern. A generic disablePlugins NestedDisableMap keyed by providerId gates the gift-card market: an entire provider (Phaze or Bitrefill) or individual Phaze brands by productId can be disabled remotely. Reuses the NestedDisableMap cleaner from ExchangeInfoActions.
a938e1e to
ee34009
Compare







CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
Requires edge-info-server to publish the new
giftCardInforollup field (edge-info-server#154). This GUI PR readsgiftCardInfoforward-compatibly, so it is backward compatible and inert against the currently published info server: with nogiftCardInfoin the rollup, nothing is disabled. The feature activates once edge-info-server publishes the field and theedge-info-serverdependency is bumped.Requirements
If you have made any visual changes to the GUI. Make sure you have:
Description
Asana task
Adds remote enable/disable of gift card providers, mirroring the existing exchange-plugins (
exchangeInfo) pattern.A new
giftCardInfoconfig is read from the info server rollup and cached in redux (state.ui.giftCardInfo). It carries a genericdisablePluginsNestedDisableMapkeyed by providerId, so it works for any present or future gift card provider:{ phaze: true }disables the entire Phaze provider.{ phaze: { "<productId>": true } }disables individual Phaze brands byproductId.{ bitrefill: true }disables Bitrefill (a webview, so whole-provider only).The Gift Card Marketplace scene filters disabled Phaze brands out of the grid and gates the Bitrefill option, via
isGiftCardBrandDisabled/isGiftCardProviderDisabledhelpers. TheNestedDisableMapcleaner is reused fromExchangeInfoActions.Changes:
GiftCardInfoActions.ts:asGiftCardInfocleaner,updateGiftCardInfo()thunk, and gating helpers.GiftCardInfoReducer.tswired intouiReducer(state.ui.giftCardInfo);UPDATE_GIFT_CARD_INFOaction.Services.tsx: dispatchupdateGiftCardInfo()in the existing info-server refresher.GiftCardMarketScene.tsx: apply per-brand and per-provider gating.Note
Low Risk
UI-only gating driven by remote config with safe empty defaults; no auth, payments, or wallet logic changes.
Overview
Adds remote kill switches for gift card providers from the info server
giftCardInforollup, following the samedisablePlugins/NestedDisableMappattern asexchangeInfo.New Redux state (
state.ui.giftCardInfo) is refreshed on the existing info-server poll inServices.tsx. Phaze brands can be hidden perproductIdor by disabling the whole provider; Bitrefill is gated only at the provider level. The marketplace scene filters the grid and category chips from enabled items only, resets the category when it becomes empty, and omits Bitrefill when disabled. Missing rollup data defaults to no disables (forward-compatible until the server ships the field).Reviewed by Cursor Bugbot for commit ee34009. Bugbot is set up for automated code reviews on this repo. Configure here.